import Vue from "vue"
import Vuex from "vuex"

Vue.use(Vuex)

const state = {
    shop:[
        {
            id:1,
            name:"苹果",
            price:5,
            count:0
        },
        {
            id:2,
            name:"草莓",
            price:10,
            count:0 
        },
        {
            id:3,
            name:"橘子",
            price:8,
            count:0
        }
    ]
}

const store = new Vuex.Store({
    state, //注册
})

export default store  //导出